package info;

import info.Shop;

public class Shop {
	private int id;
	private String name;
	private String imageURL;
	private String score;
	private String sale;
	private String sprice;
	private String dprice;
	private String distance;
	private String time;
	
	public Shop() {
		super();
	}
	
	public Shop(String name, String imageURL, String score, String sale, String sprice,String dprice, String distance, String time) {
		super();
		this.name = name;
		this.imageURL = imageURL;
		this.score = score;
		this.sale = sale;
		this.sprice = sprice;
		this.sprice = sprice;
		this.distance = distance;
		this.time = time;
		
	}
	
	public Shop(int id, String name, String imageURL, String score, String sale, String sprice, String dprice, String distance, String time, String secondNum, String wuzuoNum) {
		super();
		this.id = id;
		this.name = name;
		this.imageURL = imageURL;
		this.score = score;
		this.sale = sale;
		this.sprice = sprice;
		this.dprice = dprice;
		this.distance = distance;
		this.time = time;

	}
	public String toString() {
		return "TrainInfo [id=" + id + ", name=" + name + ", imageURL=" + imageURL + ", score=" + score + ", sale=" + sale
				+", sprice=" + sprice + ", dprice=" + dprice + ", distance=" + distance + ", time=" + time + "]";

	}
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		
		result = prime * result + id;
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result + ((imageURL == null) ? 0 : imageURL.hashCode());
		result = prime * result + ((score == null) ? 0 : score.hashCode());
		result = prime * result + ((sale == null) ? 0 : sale.hashCode());
		result = prime * result + ((sprice == null) ? 0 : sprice.hashCode());
		result = prime * result + ((dprice == null) ? 0 : dprice.hashCode());
		result = prime * result + ((distance == null) ? 0 : distance.hashCode());
		result = prime * result + ((time == null) ? 0 : time.hashCode());
		return result;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Shop other = (Shop) obj;
		if (id != other.id)
			return false;
		
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		
		if (imageURL == null) {
			if (other.imageURL != null)
				return false;
		} else if (!imageURL.equals(other.imageURL))
			return false;
		if (score == null) {
			if (other.score != null)
				return false;
		} else if (!score.equals(other.score))
			return false;
		if (sale == null) {
			if (other.sale != null)
				return false;
		} else if (!sale.equals(other.sale))
			return false;
		if (sprice == null) {
			if (other.sprice != null)
				return false;
		} else if (!sprice.equals(other.sprice))
			return false;
		if (dprice == null) {
			if (other.dprice != null)
				return false;
		} else if (!dprice.equals(other.dprice))
			return false;
		if (distance == null) {
			if (other.distance != null)
				return false;
		} else if (!distance.equals(other.distance))
			return false;
		if (time == null) {
			if (other.time != null)
				return false;
		} else if (!time.equals(other.time))
			return false;
		
		
		return true;
	}
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getImageURL() {
		return imageURL;
	}
	public void setImageURL(String imageURL) {
		this.imageURL = imageURL;
	}
	public String getScore() {
		return score;
	}
	public void setScore(String score) {
		this.score = score;
	}
	public String getSale() {
		return sale;
	}
	public void setSale(String sale) {
		this.sale = sale;
	}
	public String getSprice() {
		return sprice;
	}
	public void setSprice(String sprice) {
		this.sprice = sprice;
	}
	public String getDprice() {
		return sprice;
	}
	public void setDprice(String sprice) {
		this.sprice = sprice;
	} 
	public String getDistance() {
		return distance;
	}
	public void setDistance(String distance) {
		this.distance = distance;
	}
	public String getTime() {
		return time;
	}
	public void setTime(String time) {
		this.time = time;
	}

}
